//package cn.lijiancn01.demo.business.tenant.controller;
//
//import cn.lijiancn01.demo.business.tenant.model.SaveTenantDTO;
//import cn.lijiancn01.demo.business.tenant.model.TenantDTO;
//import cn.lijiancn01.demo.business.tenant.model.TenantQuery;
//import cn.lijiancn01.demo.business.tenant.service.TenantSercice;
//import cn.lijiancn01.demo.framework.model.PageResult;
//import cn.lijiancn01.demo.framework.model.R;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.DeleteMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
//@RestController
//@RequestMapping("/api/tenant")
//public class TenantController {
//    @Autowired
//    private TenantSercice tenantSercice;
//
//    @PostMapping("list")
//    public R<PageResult<TenantDTO>> list(@RequestBody TenantQuery req) {
//        return R.data(tenantSercice.list(req));
//    }
//
//    @PostMapping("save")
//    public R<PageResult<TenantDTO>> save(@RequestBody SaveTenantDTO req) {
//        tenantSercice.save(req);
//        return R.data(null);
//    }
//
//    @PostMapping("add")
//    public R<PageResult<TenantDTO>> add(@RequestBody SaveTenantDTO req) {
//        tenantSercice.add(req);
//        return R.data(null);
//    }
//
//    @DeleteMapping("delete/{tenantCode}")
//    public R<PageResult<TenantDTO>> delete(@PathVariable String tenantCode) {
//        tenantSercice.delete(tenantCode);
//        return R.data(null);
//    }
//
//    @DeleteMapping("batchDelete/{tenantCodes}")
//    public R<PageResult<TenantDTO>> delete(@PathVariable List<String> tenantCodes) {
//        tenantSercice.batchDelete(tenantCodes);
//        return R.data(null);
//    }
//}
